{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "CFP5sQVU_OsU"
   },
   "source": [
    "# 使用自定义非结构化数据构建 RAG\n",
    "\n",
    "_作者: [Maria Khalusova](https://github.com/MKhalusova)_\n",
    "\n",
    "如果你是 RAG 的新手，请先在[这个其他笔记](https://huggingface.co/learn/cookbook/rag_zephyr_langchain)中探索 RAG 的基础知识，然后回到这里学习如何使用自定义数据构建 RAG。\n",
    "\n",
    "无论你是正在构建基于 RAG 的个人助理、宠物项目还是企业级 RAG 系统，你很快就会发现，许多重要的知识存储在各种格式中，如 PDF 文件、电子邮件、Markdown 文件、PowerPoint 演示文稿、HTML 页面、Word 文档等。\n",
    "\n",
    "你如何预处理所有这些数据，以便你能将其用于 RAG？\n",
    "\n",
    "在这个快速教程中，你将学习如何构建一个将包含多种数据类型的 RAG 系统。你将使用 [Unstructured](https://github.com/Unstructured-IO/unstructured) 进行数据预处理，Hugging Face Hub 上的开源模型进行嵌入和文本生成，ChromaDB 作为向量存储，以及 LangChain 将所有内容整合在一起。\n",
    "\n",
    "让我们开始吧！我们首先安装所需的依赖项：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "id": "MBxI5B35_NqW"
   },
   "outputs": [],
   "source": [
    "!pip install -q torch transformers accelerate bitsandbytes sentence-transformers unstructured[all-docs] langchain chromadb langchain_community"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "y9OYqTQjEXu5"
   },
   "source": [
    "接下来，让我们获取一些文档的混合体。假设我想构建一个 RAG 系统，帮助我管理花园中的害虫。为此，我将使用涵盖 IPM（综合害虫管理）主题的多样化文档：\n",
    "* PDF: `https://www.gov.nl.ca/ecc/files/env-protection-pesticides-business-manuals-applic-chapter7.pdf`\n",
    "* PowerPoint: `https://ipm.ifas.ufl.edu/pdfs/Citrus_IPM_090913.pptx`\n",
    "* EPUB: `https://www.gutenberg.org/ebooks/45957`\n",
    "* HTML: `https://blog.fifthroom.com/what-to-do-about-harmful-garden-and-plant-insects-and-pests.html`\n",
    "\n",
    "请随意使用你自己选择的主题文档，这些文档类型由 Unstructured 支持：`.eml`, `.html`, `.md`, `.msg`, `.rst`, `.rtf`, `.txt`, `.xml`, `.png`, `.jpg`, `.jpeg`, `.tiff`, `.bmp`, `.heic`, `.csv`, `.doc`, `.docx`, `.epub`, `.odt`, `.pdf`, `.ppt`, `.pptx`, `.tsv`, `.xlsx`。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "id": "Y6lrfx-pEJgJ"
   },
   "outputs": [],
   "source": [
    "!mkdir -p \"./documents\"\n",
    "!wget https://www.gov.nl.ca/ecc/files/env-protection-pesticides-business-manuals-applic-chapter7.pdf -O \"./documents/env-protection-pesticides-business-manuals-applic-chapter7.pdf\"\n",
    "!wget https://ipm.ifas.ufl.edu/pdfs/Citrus_IPM_090913.pptx -O \"./documents/Citrus_IPM_090913.pptx\"\n",
    "!wget https://www.gutenberg.org/ebooks/45957.epub3.images -O \"./documents/45957.epub\"\n",
    "!wget https://blog.fifthroom.com/what-to-do-about-harmful-garden-and-plant-insects-and-pests.html -O \"./documents/what-to-do-about-harmful-garden-and-plant-insects-and-pests.html\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "zWB-b7Dv_ofZ"
   },
   "source": [
    "## 非结构化数据预处理\n",
    "\n",
    "你可以使用 Unstructured 库逐个预处理文档，并编写自己的脚本来遍历一个目录，但使用本地源连接器（Local source connector）来摄取给定目录中的所有文档会更加简单。Unstructured 可以从本地目录、S3 存储桶、Blob 存储、SFTP 以及许多其他可能存储文档的地方摄取文档。从这些来源摄取文档的过程非常相似，主要区别在于认证选项。\n",
    "\n",
    "在这里，你将使用本地源连接器，但也可以自由探索[Unstructured 文档](https://docs.unstructured.io/open-source/ingest/source-connectors/overview)中的其他选项。\n",
    "可选地，你还可以为处理后的文档选择一个[目的地](https://docs.unstructured.io/open-source/ingest/destination-connectors/overview) - 这可以是 MongoDB、Pinecone、Weaviate 等。在这个 notebook 中，我们将保持所有内容为本地。\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "WPpj1J8VVy_D"
   },
   "outputs": [],
   "source": [
    "# Optional cell to reduce the amount of logs\n",
    "\n",
    "import logging\n",
    "\n",
    "logger = logging.getLogger(\"unstructured.ingest\")\n",
    "logger.root.removeHandler(logger.root.handlers[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "-cE2mU_b_q7Q",
    "outputId": "e5fc9afb-85d5-4b44-cc21-7217f634f94c"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO: NumExpr defaulting to 2 threads.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-06-04 13:08:20,411 MainProcess INFO     running pipeline: DocFactory -> Reader -> Partitioner -> Copier with config: {\"reprocess\": false, \"verbose\": true, \"work_dir\": \"/root/.cache/unstructured/ingest/pipeline\", \"output_dir\": \"./local-ingest-output\", \"num_processes\": 2, \"raise_on_error\": false}\n",
      "2024-06-04 13:08:20,554 MainProcess INFO     Running doc factory to generate ingest docs. Source connector: {\"processor_config\": {\"reprocess\": false, \"verbose\": true, \"work_dir\": \"/root/.cache/unstructured/ingest/pipeline\", \"output_dir\": \"./local-ingest-output\", \"num_processes\": 2, \"raise_on_error\": false}, \"read_config\": {\"download_dir\": \"\", \"re_download\": false, \"preserve_downloads\": false, \"download_only\": false, \"max_docs\": null}, \"connector_config\": {\"input_path\": \"./documents\", \"recursive\": false, \"file_glob\": null}}\n",
      "2024-06-04 13:08:20,577 MainProcess INFO     processing 4 docs via 2 processes\n",
      "2024-06-04 13:08:20,581 MainProcess INFO     Calling Reader with 4 docs\n",
      "2024-06-04 13:08:20,583 MainProcess INFO     Running source node to download data associated with ingest docs\n",
      "2024-06-04 13:08:23,632 MainProcess INFO     Calling Partitioner with 4 docs\n",
      "2024-06-04 13:08:23,633 MainProcess INFO     Running partition node to extract content from json files. Config: {\"pdf_infer_table_structure\": false, \"strategy\": \"auto\", \"ocr_languages\": null, \"encoding\": null, \"additional_partition_args\": {}, \"skip_infer_table_types\": null, \"fields_include\": [\"element_id\", \"text\", \"type\", \"metadata\", \"embeddings\"], \"flatten_metadata\": false, \"metadata_exclude\": [], \"metadata_include\": [], \"partition_endpoint\": \"https://api.unstructured.io/general/v0/general\", \"partition_by_api\": true, \"api_key\": \"*******\", \"hi_res_model_name\": null}, partition kwargs: {}]\n",
      "2024-06-04 13:08:23,637 MainProcess INFO     Creating /root/.cache/unstructured/ingest/pipeline/partitioned\n",
      "2024-06-04 13:09:41,468 MainProcess INFO     Calling Copier with 4 docs\n",
      "2024-06-04 13:09:41,469 MainProcess INFO     Running copy node to move content to desired output location\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "\n",
    "from unstructured.ingest.connector.local import SimpleLocalConfig\n",
    "from unstructured.ingest.interfaces import PartitionConfig, ProcessorConfig, ReadConfig\n",
    "from unstructured.ingest.runner import LocalRunner\n",
    "\n",
    "output_path = \"./local-ingest-output\"\n",
    "\n",
    "runner = LocalRunner(\n",
    "    processor_config=ProcessorConfig(\n",
    "        # logs verbosity\n",
    "        verbose=True,\n",
    "        # the local directory to store outputs\n",
    "        output_dir=output_path,\n",
    "        num_processes=2,\n",
    "        ),\n",
    "    read_config=ReadConfig(),\n",
    "    partition_config=PartitionConfig(\n",
    "        partition_by_api=True,\n",
    "        api_key=\"YOUR_UNSTRUCTURED_API_KEY\",\n",
    "        ),\n",
    "    connector_config=SimpleLocalConfig(\n",
    "        input_path=\"./documents\",\n",
    "        # whether to get the documents recursively from given directory\n",
    "        recursive=False,\n",
    "        ),\n",
    "    )\n",
    "runner.run()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "68WTKNVSzgVw"
   },
   "source": [
    "让我们更详细地看看这里的配置。\n",
    "\n",
    "`ProcessorConfig` 控制处理管道的各个方面，包括输出位置、工作线程数量、错误处理行为、日志详细程度等。这里的唯一必填参数是 `output_dir` - 你希望存储输出的本地目录。\n",
    "\n",
    "`ReadConfig` 可以用来为不同场景自定义数据读取过程，例如重新下载数据、保留已下载的文件或限制处理的文档数量。在大多数情况下，默认的 `ReadConfig` 将适用。\n",
    "\n",
    "在 `PartitionConfig` 中，你可以选择是在本地还是通过 API 对文档进行分区。这个例子使用 API，因此需要 Unstructured API 密钥。你可以在这里[获取](https://unstructured.io/api-key-free)。免费的 Unstructured API 限制为 1000 页，并且为基于图像的文档提供了比本地安装的 Unstructured 更好的 OCR 模型。\n",
    "\n",
    "如果你删除这两个参数，文档将本地处理，但如果文档需要 OCR 和/或文档理解模型，你可能需要安装额外的依赖项。具体来说，在这种情况下，你可能需要安装 poppler 和 tesseract，你可以使用 brew 来获取：\n",
    "\n",
    "```\n",
    "!brew install poppler\n",
    "!brew install tesseract\n",
    "```\n",
    "\n",
    "如果你使用的是 Windows 系统，你可以在[Unstructured 文档](https://docs.unstructured.io/open-source/installation/full-installation)中找到替代的安装说明。\n",
    "\n",
    "最后，在 `SimpleLocalConfig` 中，你需要指定原始文档所在的位置，以及你是否想要递归地遍历目录。\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "AJ4TbyjDTvJG"
   },
   "source": [
    "一旦文档被处理，你将在 `local-ingest-output` 目录中找到 4 个 json 文件，每个被处理的文档对应一个。\n",
    "\n",
    "Unstructured 以统一的方式对所有类型的文档进行分区，并返回带有文档元素的 json。\n",
    "\n",
    "[文档元素](https://docs.unstructured.io/api-reference/api-services/document-elements) 有一个类型，例如 `NarrativeText`，`Title` 或 `Table`，它们包含提取的文本，以及 Unstructured 能够获取的元数据。一些元数据对所有元素都是通用的，比如元素所在的文档的文件名。其他元数据取决于文件类型或元素类型。例如，`Table` 元素将在元数据中包含表格的 html 表示，而电子邮件的元数据将包含关于发件人和收件人的信息。\n",
    "\n",
    "让我们从这些 json 文件中导入元素对象。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "SFYTNEV3Toi5"
   },
   "outputs": [],
   "source": [
    "from unstructured.staging.base import elements_from_json\n",
    "\n",
    "elements = []\n",
    "\n",
    "for filename in os.listdir(output_path):\n",
    "    filepath = os.path.join(output_path, filename)\n",
    "    elements.extend(elements_from_json(filepath))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "NNxdUhBpgEP0"
   },
   "source": [
    "现在你已经从文档中提取了元素，你可以将它们分块以适应嵌入模型的上下文窗口。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "7Qkqf-1vcHkj"
   },
   "source": [
    "## 分块\n",
    "\n",
    "如果你熟悉将长文本文档分割成较小块的分块方法，你会注意到 Unstructured 的分块方法略有不同，因为分区步骤已经将整个文档分割成其结构元素：标题、列表项、表格、文本等。通过这种方式对文档进行分区，你可以避免不相关的文本片段最终出现在同一个元素，甚至是同一个块中的情况。\n",
    "\n",
    "现在，当你使用 Unstructured 对文档元素进行分块时，单个元素已经是小的，因此只有当它们超过所需的最大块大小时才会被分割。否则，它们将保持原样。你还可以选择性地将连续的文本元素（例如列表项）组合在一起，使它们共同符合块大小限制。\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "id": "b5TQXKevflgD"
   },
   "outputs": [],
   "source": [
    "from unstructured.chunking.title import chunk_by_title\n",
    "\n",
    "chunked_elements = chunk_by_title(elements,\n",
    "                                  # maximum for chunk size\n",
    "                                  max_characters=512,\n",
    "                                  # You can choose to combine consecutive elements that are too small\n",
    "                                  # e.g. individual list items\n",
    "                                  combine_text_under_n_chars=200,\n",
    "                                  )\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "oqLV_c58UccF"
   },
   "source": [
    "这些块已经准备好用于 RAG 了。为了将它们与 LangChain 一起使用，你可以轻松地将 Unstructured 元素转换为 LangChain 文档。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "PXL6O-mqUeQA"
   },
   "outputs": [],
   "source": [
    "from langchain_core.documents import Document\n",
    "\n",
    "documents = []\n",
    "for chunked_element in chunked_elements:\n",
    "    metadata = chunked_element.metadata.to_dict()\n",
    "    metadata[\"source\"] = metadata[\"filename\"]\n",
    "    del metadata[\"languages\"]\n",
    "    documents.append(Document(page_content=chunked_element.text, metadata=metadata))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "QC_wbI0khYrS"
   },
   "source": [
    "## 设置检索器"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "j-b291hb05zn"
   },
   "source": [
    "这个例子使用 ChromaDB 作为向量存储，以及 [`BAAI/bge-base-en-v1.5`](https://huggingface.co/BAAI/bge-base-en-v1.5) 嵌入模型，你可以自由使用任何其他向量存储。\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "id": "Z6Nm67BohXF8"
   },
   "outputs": [],
   "source": [
    "from langchain_community.vectorstores import Chroma\n",
    "from langchain.embeddings import HuggingFaceEmbeddings\n",
    "\n",
    "from langchain.vectorstores import utils as chromautils\n",
    "\n",
    "# ChromaDB doesn't support complex metadata, e.g. lists, so we drop it here.\n",
    "# If you're using a different vector store, you may not need to do this\n",
    "docs = chromautils.filter_complex_metadata(documents)\n",
    "\n",
    "embeddings = HuggingFaceEmbeddings(model_name=\"BAAI/bge-base-en-v1.5\")\n",
    "vectorstore = Chroma.from_documents(documents, embeddings)\n",
    "retriever = vectorstore.as_retriever(search_type=\"similarity\", search_kwargs={\"k\": 3})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "5t8kHHor1DfX"
   },
   "source": [
    "如果你打算使用 Hugging Face Hub 上的门控模型，无论是嵌入模型还是文本生成模型，你都需要使用你的 Hugging Face token 进行身份验证，你可以在你的 Hugging Face 个人资料设置中获取这个 token 。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "J21Oj3trhinC"
   },
   "outputs": [],
   "source": [
    "from huggingface_hub import notebook_login\n",
    "\n",
    "notebook_login()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "0pYCTJ8s1QJd"
   },
   "source": [
    "## 使用 LangChain 构建 RAG\n",
    "\n",
    "让我们将所有内容整合在一起，使用 LangChain 构建 RAG。\n",
    "\n",
    "在这个例子中，我们将使用来自 Meta 的[`Llama-3-8B-Instruct`](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)。为了确保它可以在 Google Colab 的免费 T4 运行时中顺利运行，你需要对其进行量化。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "J14vrinjh2N5"
   },
   "outputs": [],
   "source": [
    "from langchain.prompts import PromptTemplate\n",
    "from langchain.llms import HuggingFacePipeline\n",
    "from transformers import pipeline\n",
    "import torch\n",
    "from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig\n",
    "from langchain.chains import RetrievalQA"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "id": "tLe4Y3aBh4A3"
   },
   "outputs": [],
   "source": [
    "model_name = \"meta-llama/Meta-Llama-3-8B-Instruct\"\n",
    "\n",
    "bnb_config = BitsAndBytesConfig(\n",
    "    load_in_4bit=True, bnb_4bit_use_double_quant=True, bnb_4bit_quant_type=\"nf4\", bnb_4bit_compute_dtype=torch.bfloat16\n",
    ")\n",
    "\n",
    "model = AutoModelForCausalLM.from_pretrained(model_name, quantization_config=bnb_config)\n",
    "tokenizer = AutoTokenizer.from_pretrained(model_name)\n",
    "\n",
    "terminators = [\n",
    "    tokenizer.eos_token_id,\n",
    "    tokenizer.convert_tokens_to_ids(\"<|eot_id|>\")\n",
    "]\n",
    "\n",
    "text_generation_pipeline = pipeline(\n",
    "    model=model,\n",
    "    tokenizer=tokenizer,\n",
    "    task=\"text-generation\",\n",
    "    temperature=0.2,\n",
    "    do_sample=True,\n",
    "    repetition_penalty=1.1,\n",
    "    return_full_text=False,\n",
    "    max_new_tokens=200,\n",
    "    eos_token_id=terminators,\n",
    ")\n",
    "\n",
    "llm = HuggingFacePipeline(pipeline=text_generation_pipeline)\n",
    "\n",
    "prompt_template = \"\"\"\n",
    "<|start_header_id|>user<|end_header_id|>\n",
    "You are an assistant for answering questions using provided context.\n",
    "You are given the extracted parts of a long document and a question. Provide a conversational answer.\n",
    "If you don't know the answer, just say \"I do not know.\" Don't make up an answer.\n",
    "Question: {question}\n",
    "Context: {context}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n",
    "\"\"\"\n",
    "\n",
    "prompt = PromptTemplate(\n",
    "    input_variables=[\"context\", \"question\"],\n",
    "    template=prompt_template,\n",
    ")\n",
    "\n",
    "\n",
    "qa_chain = RetrievalQA.from_chain_type(\n",
    "    llm,\n",
    "    retriever=retriever,\n",
    "    chain_type_kwargs={\"prompt\": prompt}\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "_hvjRpOe1qYp"
   },
   "source": [
    "## 结果和下一步\n",
    "\n",
    "现在你已经有了 RAG 链，让我们问问它关于蚜虫的问题。在我的花园里，它们是害虫吗？\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 89
    },
    "id": "whll1qGuyDnC",
    "outputId": "31ca901b-bae7-487a-88c6-1d245ef6cdfb"
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Setting `pad_token_id` to `eos_token_id`:128009 for open-end generation.\n"
     ]
    },
    {
     "data": {
      "application/vnd.google.colaboratory.intrinsic+json": {
       "type": "string"
      },
      "text/plain": [
       "\"Yes, aphids are considered pests because they feed on the nutrient-rich liquids within plants, causing damage and potentially spreading disease. In fact, they're known to multiply quickly, which is why it's essential to control them promptly. As mentioned in the text, aphids can also attract ants, which are attracted to the sweet, sticky substance they produce called honeydew. So, yes, aphids are indeed a pest that requires attention to prevent further harm to your plants!\""
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "question = \"Are aphids a pest?\"\n",
    "\n",
    "qa_chain.invoke(question)['result']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "CYWNJ9DGVkg0"
   },
   "source": [
    "输出:\n",
    "\n",
    "```bash\n",
    "Yes, aphids are considered pests because they feed on the nutrient-rich liquids within plants, causing damage and potentially spreading disease. In fact, they're known to multiply quickly, which is why it's essential to control them promptly. As mentioned in the text, aphids can also attract ants, which are attracted to the sweet, sticky substance they produce called honeydew. So, yes, aphids are indeed a pest that requires attention to prevent further harm to your plants!\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "bOh5z28I10Te"
   },
   "source": [
    "这看起来是一个很有希望的开始！现在你已经了解了预处理复杂非结构化数据以供 RAG 使用的基础知识，你可以继续改进这个例子。以下是一些建议：\n",
    "\n",
    "* 你可以连接到不同的源来摄取文档，例如，从一个 S3 存储桶。\n",
    "* 你可以在 `qa_chain` 参数中添加 `return_source_documents=True`，使链在返回答案时同时返回作为上下文传递给提示的文档。这有助于理解生成答案时使用了哪些源。\n",
    "* 如果你想要在检索阶段利用元素元数据，可以考虑使用 Hugging Face Agent 并创建一个自定义检索器工具，如[这个其他 notebook](https://huggingface.co/learn/cookbook/agents#2--rag-with-iterative-query-refinement--source-selection) 中所述。\n",
    "* 有许多方法可以改善搜索结果。例如，你可以使用混合搜索代替单一的相似性搜索检索器。混合搜索结合了多种搜索算法，以提高搜索结果的准确性和相关性。通常，它是基于关键词的搜索算法与向量搜索方法的结合。\n",
    "\n",
    "在使用非结构化数据构建 RAG 应用程序时玩得开心！\n"
   ]
  }
 ],
 "metadata": {
  "accelerator": "GPU",
  "colab": {
   "gpuType": "T4",
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3",
   "name": "python3"
  },
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
